<!-- $Id: ad_position_list.htm 14216 2008-03-10 02:27:21Z testyang $ -->
{if $full_page}
{include file="pageheader.htm"}
{insert_scripts files="../js/utils.js,listtable.js"}

<div class="form-div">
  <form action="javascript:search_ad_position()" name="searchForm">
    <img src="images/icon_search.gif" width="26" height="22" border="0" alt="SEARCH" />
    <select name="select" value="按广告位名称">
	<option value="按广告位名称">按广告位名称</option>
	<option value="按广告位ID">按广告位ID</option>
	</select>
    关键字<input type="text" name="keyword" size="15" />
    <input type="submit" value="{$lang.button_search}" class="button" />
  </form>
</div>

<script language="JavaScript">
    function search_ad_position()
    {
		listTable.filter['select'] = document.forms['searchForm'].elements['select'].value;
        listTable.filter['keyword'] = Utils.trim(document.forms['searchForm'].elements['keyword'].value);
        listTable.filter['page'] = 1;
        
        listTable.loadList();
    }

</script>

<form method="post" action="" name="listForm">
<!-- start ad position list -->
<div class="list-div" id="listDiv">
{/if}

<table cellpadding="3" cellspacing="1">
  <tr>
    <th>{$lang.position_id}</th>
    <th>{$lang.position_name}</th>
    <th>{$lang.posit_width}</th>
    <th>{$lang.posit_height}</th>
    <th>{$lang.position_desc}</th>
    <th>{$lang.handler}</th>
  </tr>
  {foreach from=$position_list item=list}
  <tr>
    <td align="center" class="first-cell">{$list.position_id}</td>
    <td class="first-cell">
    <span onclick="javascript:listTable.edit(this, 'edit_position_name', {$list.position_id})">{$list.position_name|escape:html}</span>
    </td>
    <td align="center"><span onclick="javascript:listTable.edit(this, 'edit_ad_width', {$list.position_id})">{$list.ad_width}</span></td>
    <td align="center"><span onclick="javascript:listTable.edit(this, 'edit_ad_height', {$list.position_id})">{$list.ad_height}</span></td>
    <td align="center"><span>{$list.position_desc|escape:html}</span></td>
    <td align="center">
      <a href="ads.php?act=list&pid={$list.position_id}" title="{$lang.view}{$lang.ad_content}">
      <img src="images/icon_view.gif" border="0" height="16" width="16" /></a>
      <a href="ad_position.php?act=edit&id={$list.position_id}" title="{$lang.edit}">
      <img src="images/icon_edit.gif" border="0" height="16" width="16" /></a>
      <a href="javascript:;" onclick="listTable.remove({$list.position_id}, '{$lang.drop_confirm}')" title="{$lang.remove}"><img src="images/icon_drop.gif" border="0" height="16" width="16" /></a>
    </td>
  </tr>
  {foreachelse}
    <tr><td class="no-records" colspan="6">{$lang.no_position}</td></tr>
  {/foreach}
  <tr>
    <td align="right" nowrap="true" colspan="6">{include file="page.htm"}</td>
  </tr>
</table>

{if $full_page}
</div>
<!-- end ad_position list -->
</form>

<script type="text/javascript" language="JavaScript">
  listTable.recordCount = {$record_count};
  listTable.pageCount = {$page_count};

  {foreach from=$filter item=item key=key}
  listTable.filter.{$key} = '{$item}';
  {/foreach}
  {literal}
  onload = function()
  {
    // &#64138;&#53036;&#10870;鵥
    startCheckOrder();
  }
  {/literal}
</script>
{include file="pagefooter.htm"}
{/if}
